package com.coder.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 *一天的Isa平均值 
 * @author founder
 */
@Entity
@Table(name="dayisa")
public class DayIsa {
	
	private Integer id;
	
	/**这个日期所在的月份，用于计算一个月的平均值*/
	private String monthStr;
	
	/**日期，只包含天数，如2015-8-31*/
	private Date day;
	
	/**字符串格式的天数*/
	private String dayStr;
	
	/**模式0或者模式1*/
	private int mode;
	
	/**平均值,数据库中只存储字符串类型的数据*/
	private float[] avgValues;
	private String avgValStr;
	
	/**最大值*/
	private float[] maxValues;
	private String maxValStr;
	
	/**最小值*/
	private float[] minValues;
	private String minValStr;
	
	/**这一天的记录个数*/
	private float recordNum;
	
	//常备参数
	private String ProdNr;
	private String SerNr;
	private String SensorNr;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)  
	@Column(name="id",nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name="day",nullable=false)
	public Date getDay() {
		return day;
	}
	public void setDay(Date day) {
		this.day = day;
	}

	@Column(name="mode",nullable=false)
	public int getMode() {
		return mode;
	}
	public void setMode(int mode) {
		this.mode = mode;
	}
	@Transient
	public float[] getAvgValues() {
		return avgValues;
	}
	public void setAvgValues(float[] avgValues) {
		this.avgValues = avgValues;
	}
	@Column(name="avgvalstr",nullable=false)
	public String getAvgValStr() {
		return avgValStr;
	}
	public void setAvgValStr(String avgValStr) {
		this.avgValStr = avgValStr;
	}
	@Transient
	public float[] getMaxValues() {
		return maxValues;
	}
	public void setMaxValues(float[] maxValues) {
		this.maxValues = maxValues;
	}
	@Column(name="maxvalstr")
	public String getMaxValStr() {
		return maxValStr;
	}
	public void setMaxValStr(String maxValStr) {
		this.maxValStr = maxValStr;
	}
	@Transient
	public float[] getMinValues() {
		return minValues;
	}
	public void setMinValues(float[] minValues) {
		this.minValues = minValues;
	}
	@Column(name="minvalstr")
	public String getMinValStr() {
		return minValStr;
	}
	public void setMinValStr(String minValStr) {
		this.minValStr = minValStr;
	}
	@Column(name="ProdNr")
	public String getProdNr() {
		return ProdNr;
	}
	public void setProdNr(String prodNr) {
		ProdNr = prodNr;
	}
	@Column(name="SerNr")
	public String getSerNr() {
		return SerNr;
	}
	public void setSerNr(String serNr) {
		SerNr = serNr;
	}
	@Column(name="SensorNr")
	public String getSensorNr() {
		return SensorNr;
	}
	public void setSensorNr(String sensorNr) {
		SensorNr = sensorNr;
	}
	@Transient
	public String getDayStr() {
		return dayStr;
	}
	public void setDayStr(String dayStr) {
		this.dayStr = dayStr;
	}

	@Column(name="monthstr")
	public String getMonthStr() {
		return monthStr;
	}
	public void setMonthStr(String monthStr) {
		this.monthStr = monthStr;
	}
	@Column(name="recordnum")
	public float getRecordNum() {
		return recordNum;
	}
	public void setRecordNum(float recordNum) {
		this.recordNum = recordNum;
	}
}
